
<template>
  <div class="lr_titles">
    <div class="item_title" v-if="title !== ''">
      <span class="title-inner"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
    </div>
    <div :class="title !== '' ? 'item_title_content' : 'item_title_content_def'">
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: {
    title: {
      type: String,
      default: () => "",
    },
  },
  created() { },

  mounted() { },
  methods: {},
};
</script>
<style lang='scss' scoped>
$item-title-height: 48px;
$item_title_content-height: calc(100% - 48px);

.lr_titles {
  box-sizing: border-box;

  :deep(.border-box-content) {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

  .item_title {
    height: $item-title-height;
    line-height: $item-title-height;
    width: 100%;
    text-align: left;
    position: relative;
    background-image: url("../../assets/img/titlelogo.png");
    background-size: cover;
    background-position: center center;

    .title-inner {
      height: 22px;
      font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
      font-weight: normal;
      font-size: 16px;
      color: #FFFFFF;
      line-height: 48px;
      text-align: left;
      font-style: normal;
      text-transform: none;
      margin: 0 40px;
    }
  }

  .item_title_content {
    height: $item_title_content-height;
    background: rgba(9, 11, 27, 0.7);
  }

  .item_title_content_def {
    width: 100%;
    height: 100%;
  }
}
</style>